module.exports = {
    /* when you test the function,check the Url about the port whether it is corresponding with the egg project start in (7002/7001/?) */
    params(key) {
        const method = this.request.method
        if (method === 'GET') {
            return key ? this.query[key] : this.query;
        } else {
            return key ? this.request.body[key] : this.request.body;
        }
    }

};